#include <iostream>
#include <stdio.h>
#include <cstring>
using namespace std;
const int MAXN=1e6+7;
typedef long long ll;
ll prime[MAXN];
int pri_cnt;
ll mubi[MAXN];
void Init() {
	bool visited[MAXN];
	memset(visited, 0, sizeof(visited));
	mubi[1]=1;
	for (int i=2; i<MAXN; ++i) {
		if (!visited[i]) {
			mubi[i]=-1;
			prime[pri_cnt++]=i;
		}
		for (int j=0; j<pri_cnt && i*prime[j]<MAXN; ++j) {
			if (i%prime[j]) {
				mubi[i*prime[j]] = -mubi[i];
			}
			else {
				mubi[i*prime[j]] = 0;
			}
			visited[i*prime[j]]=true;
		}
	}
}
int main() {
	Init();
	freopen("output.txt", "w", stdout);
	cout<<"----------"<<endl;
	for (int i=0; i<pri_cnt; ++i) cout<<prime[i]<<' ';
	cout<<"\n--------"<<endl;
	for (int i=0; i<20; ++i) cout<<i<<": "<<mubi[i]<<endl;
	fclose(stdout);
	return 0;
} 
